<?php
	include '../common/connect.php';
	$result = mysql_query("SELECT * FROM pic ORDER BY time DESC");
	$resultArray = array();
	$i = 0;
	while($row = mysql_fetch_array($result)){
		$resultArray[$i] = array(
			'id' => $row['id'],
			'path' => $row['path'],
			'imgName' => $row['imgName'],
			'type' => $row['type'],
			'typeName' => $row['typeName'],
			'description' => $row['description'],
			'size' => $row['size'],
			'time' => $row['time']
		);
		$i++;
	}
	mysql_close($con);
	echo json_encode($resultArray);
?>